package dominio;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

import adicionales.ValorInvalidoExeception;

public class ValidarStringNoVacio implements Validador<String>, PropertyChangeListener {
	
	boolean estadoDeValidacion = true;

	public boolean validar(String valor){
		return valor.length() > 0;
	}

	@Override
	public void propertyChange(PropertyChangeEvent evt) {
			this.estadoDeValidacion = validar(evt.getNewValue().toString());

	}

	public boolean isValido() {
		return estadoDeValidacion;
	}

}

